// @FileName  :typeset.c
// @Time      :2024/3/1 13:51
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>
int pos=0;
char *modify(char *buffer) {
    char *res = (char *) malloc(sizeof(char) * strlen(buffer));
    int st = 0, j, space = 0;
    for(int i=0;i<strlen(buffer);i++)if (buffer[i] == '\t') buffer[i]=' ';
    while (buffer[st++] == ' ');
    st--;
    for (j = 0; st < strlen(buffer); st++) {
        if (buffer[st] == ' ' && space == 1) continue;//跳过多余空格
        else if (buffer[st] == ':') {
            pos=j;
            space = 0;
            if (res[j - 1] != ' ') res[j++] = ' ';
            res[j++] = buffer[st];
            if (buffer[st + 1] != ' ')  res[j++] = ' ';
        } else {
            if (buffer[st] == ' ')space = 1;
            else space = 0;
            res[j++] = buffer[st];
        }
    }
    res[j] = '\0';
    return res;
}

void solve() {
    int all;
    char buffer[10086];
    scanf("%d", &all);
    gets(buffer);
    while (gets(buffer) != NULL) {
        pos=0;
        buffer[strlen(buffer)] = '\0';
        char *ans = modify(buffer);
        for(int i=2;i<all-pos;i++) printf(" ");
        printf("%s", ans);
        printf("\n");
    }
}

void main() {
    int t = 1;
    //scanf("%d", &t);
    while (t--) solve();
    return 0;
}